import Vue from "vue";
import VueRouter from "vue-router";

Vue.use(VueRouter);

const vueRouter = new VueRouter({
    // mode: "history",
    routes: [
        {
            path: "/wjw",
            name: "急救中心-路径规划",
            meta: {
                title: '急救资源'
            },
            component: () => import("../views/health-commission/home")
        },
        {
            path: "/tyj",
            name: "体育局-路径规划",
            meta: {
                title: '体育场馆'
            },
            component: () => import("../views/sports-bureau/home"),
        },
        {
            path: "/sfj",
            name: "司法局",
            meta: {
                title: '司法局'
            },
            component: () => import("../views/sfj/home"),
        },
        {
            path: "/sfj/list01",
            name: "司法局-法律服务所",
            meta: {
                title: '法律服务所'
            },
            component: () => import("../views/sfj/Serviceofficelist"),
        },
        {
            path: "/sfj/detail01",
            name: "司法局-法律服务所介绍",
            meta: {
                title: '法律服务所介绍'
            },
            component: () => import("../views/sfj/Serviceofficedetail"),
        },
        {
            path: "/sfj/workerlist",
            name: "法律服务工作者",
            meta: {
                title: '法律服务工作者'
            },
            component: () => import("../views/sfj/workerlist"),
        },
        {
            path: "/sfj/workerInfo",
            name: "法律服务工作者",
            meta: {
                title: '法律服务工作者'
            },
            component: () => import("../views/sfj/workerInfo"),
        },
        {
            path: "/sfj/list03",
            name: "司法局-法律宣传公告",
            meta: {
                title: '司宣传公告'
            },
            component: () => import("../views/sfj/noticelist"),
        },
        {
            path: "/sfj/detail03",
            name: "司法局-公告详情",
            meta: {
                title: '公告详情'
            },
            component: () => import("../views/sfj/noticedetail"),
        },
        {
            path: "/tyj/detail",
            name: "建湖体育馆",
            meta: {
                title: '体育场馆'
            },
            component: () => import("../views/sports-bureau/detail"),
        },
        {
            path: "/wgj",
            name: "文广旅-滨海旅游",
            meta: {
                title: '畅游滨海'
            },
            component: () => import("../views/travel/home"),
        },
        {
            path: "/travel/eat",
            name: "文广旅-滨海旅游",
            meta: {
                title: '吃在滨海'
            },
            component: () => import("../views/travel/eat"),
        },
        {
            path: "/travel/play",
            name: "文广旅-滨海旅游",
            meta: {
                title: '玩在滨海'
            },
            component: () => import("../views/travel/play"),
        },
        {
            path: "/travel/live",
            name: "文广旅-滨海旅游",
            meta: {
                title: '住在滨海'
            },
            component: () => import("../views/travel/live"),
        },
        {
            path: "/travel/buy",
            name: "文广旅-滨海旅游",
            meta: {
                title: '购在滨海'
            },
            component: () => import("../views/travel/buy"),
        },
        {
            path: "/travel/detail",
            name: "文广旅-滨海旅游",
            meta: {
                title: '详情'
            },
            component: () => import("../views/travel/detail"),
        },
        {
            path: "/water",
            name: "供水公司",
            meta: {
                title: '滨海自来水'
            },
            component: () => import("../views/tap-water/home"),
        },
        {
            path: "/tap-water/list",
            meta: {
                title: "列表集合",
            },
            component: () => import("../views/tap-water/list"),
        },
        {
            path: "/tap-water/list01",
            name: "供水公司——水费缴纳",
            meta: {
                title: '水费缴纳'
            },
            component: () => import("../views/tap-water/list01"),
        },
        {
            path: "/tap-water/tsgg",
            name: "供水公司——停水公告",
            meta: {
                title: '停水公告'
            },
            component: () => import("../views/tap-water/tsgg"),
        },
        {
            path: "/tap-water/sjxx",
            name: "水价信息",
            meta: {
                title: '水价信息'
            },
            component: () => import("../views/tap-water/sjxx"),
        },
        {
            path: "/tap-water/yscs",
            name: "用水常识",
            meta: {
                title: '用水常识'
            },
            component: () => import("../views/tap-water/yscs"),
        },
        {
            path: "/tap-water/szgs",
            name: "水质公示",
            meta: {
                title: '水质公示'
            },
            component: () => import("../views/tap-water/szgs"),
        },
        {
            path: "/tap-water/list03",
            name: "缴费记录",
            meta: {
                title: '缴费记录'
            },
            component: () => import("../views/tap-water/list03"),
        },
        {
            path: "/tap-water/jfcx",
            name: "缴费记录",
            meta: {
                title: '缴费记录'
            },
            component: () => import("../views/tap-water/jfcx"),
        },
        {
            path: "/tap-water/list04",
            name: "立即缴费",
            meta: {
                title: '立即缴费'
            },
            component: () => import("../views/tap-water/list04"),
        },
        // {
        //     path: "/tap-water/list05",
        //     name: "供水公司——缴纳查询",
        //     meta: {
        //         title: '缴费记录'
        //     },
        //     component: () => import("../views/tap-water/list05"),
        // },
        {
            path: "/tap-water/success",
            name: "缴纳结果",
            meta: {
                title: '缴纳结果'
            },
            component: () => import("../views/tap-water/success"),
        },
        {
            path: "/tap-water/qian",
            name: "供水公司——有无欠费",
            meta: {
                title: '缴纳结果'
            },
            component: () => import("../views/tap-water/qian"),
        }

    ]
});

// 跳转更换叶签标题
vueRouter.beforeEach((to, from, next) => {
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
});

export default vueRouter;
